package com.example.myapplication.KeChengMingShiFragment;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.example.myapplication.KeChengMingShiAdapter.MingShiChongCiAdapter;
import com.example.myapplication.KeChengMingShiBean.MingShiRvChongCiBean;
import com.example.myapplication.R;

import java.util.ArrayList;
import java.util.List;

public class KeChengMingShiQiangfenChongCiFragment extends Fragment {
    RecyclerView MingShi_RV3;
    List<MingShiRvChongCiBean>listChongCi=new ArrayList<>();
    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view=inflater.inflate(R.layout.fragment_mingshi_qiangfen,container,false);

        MingShi_RV3=view.findViewById(R.id.MingShi_RV_ChongChiJieDuan);

        listChongCi.add(new MingShiRvChongCiBean(R.mipmap.hangtianjishu,"5年","进入空间的能力相关管人员培养","进入空间的能力相关管人员培养","付费","伟大的人"));
        listChongCi.add(new MingShiRvChongCiBean(R.mipmap.hangtianjishu,"5年","卫星的制造技术","卫星的制造技术相关管人员培养","付费","伟大的人"));
        listChongCi.add(new MingShiRvChongCiBean(R.mipmap.hangtianjishu,"5年","载人航天技术相关管人员培养","载人航天技术相关管人员培养","付费","伟大的人"));

        LinearLayoutManager linearLayoutManager=new LinearLayoutManager(this.getActivity());
        linearLayoutManager.setOrientation(LinearLayoutManager.HORIZONTAL);
        MingShi_RV3.setLayoutManager(linearLayoutManager);

        MingShiChongCiAdapter mingShiChongCiAdapter=new MingShiChongCiAdapter(listChongCi);
        MingShi_RV3.setAdapter(mingShiChongCiAdapter);

        return view;
    }
}
